package com.helen.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.helen.entity.MoneyListEntity;
import com.helen.entity.MoneyListEntity;
import com.helen.shopping.R;
import com.helen.utils.MyLog;

import java.util.List;


/**
 * Created by yang on 2018/4/23.
 */

public class MoneyListAdapter extends BaseQuickAdapter<MoneyListEntity.ListBean, BaseViewHolder> {
    public MoneyListAdapter(int layoutResId, List<MoneyListEntity.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final MoneyListEntity.ListBean item) {
        try {
            TextView tvTitle = (TextView) helper.getView(R.id.tv_title);
            TextView tvTime = (TextView) helper.getView(R.id.tv_time);
            TextView tvMethod = (TextView) helper.getView(R.id.tv_method);
            TextView tvMoney = (TextView) helper.getView(R.id.tv_money);
            tvTitle.setText(item.getTitle());
            tvTime.setText(item.getTime());
            tvMethod.setText("[" + item.getMethod() + "]");
            tvMoney.setText(item.getMoney() + "");
        } catch (Exception e) {
            MyLog.e("yang", "设置金宝余额列表异常" + e.toString());
        }


    }


}
